/**
 * Generate time : 2011-06-24 15:32:59
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCMInventorydetail
 * 
 */
public class ZMCMInventorydetail extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdInventoryId = " "; /* 盘点主表主键 */
	private String fdMaterialId = " "; /* 物资ID */
	private String fdMaterialCode = " "; /* 物资编码 */
	private String fdMaterialInnerCode = " "; /* 物资内码 */
	private String fdMaterialName = " "; /* 物资名称 */
	private String fdSpecModel = " "; /* 规格型号 */
	private String fdNumber = " "; /* 图号 */
	private String fdQuality = " "; /* 材质 */
	private String fdMetric = " "; /* 计量单位 */
	private Double fdPrice = new Double(0); /* 单价 */
	private Double fdAccountSum = new Double(0); /* 账面库存量 */
	private Double fdActualSum = new Double(0); /* 实际库存量 */
	private Double fdProfitLoss = new Double(0); /* 盈亏量 */
	private String fdReason = " "; /* 盈亏原因 */
	private Double fdImportNum = new Double(0); /* 入库数量 */
	private Double fdExportNum = new Double(0); /* 出库数量 */
	private Double fdAccountMoney = new Double(0); /* 账面库存金额 */
	private Double fdActualMoney = new Double(0); /* 实际库存金额 */
	private Double fdHasInvoiceNum = new Double(0); /* 有发票库存量 */
	private Double fdNoInvoiceNum = new Double(0); /* 无发票库存量 */
	private Double fdHasInvoiceLoss = new Double(0); /* 有发票盈亏量*/
	private Double fdNoInvoiceLoss = new Double(0); /* 无发票盈亏量*/

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdInventoryId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("盘点主表主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("物资ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("物资编码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialInnerCode");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("物资内码");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMaterialName");
		eiColumn.setFieldLength(80);
		eiColumn.setDescName("物资名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSpecModel");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("规格型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdNumber");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("图号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdQuality");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("材质");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMetric");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("计量单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPrice");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("单价");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAccountSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("账面库存量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdActualSum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("实际库存量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProfitLoss");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("盈亏量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdReason");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("盈亏原因");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdImportNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("入库数量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdExportNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("出库数量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAccountMoney");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("账面库存金额");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdActualMoney");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("实际库存金额");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdHasInvoiceNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("有发票库存量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdNoInvoiceNum");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("无发票库存量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdHasInvoiceLoss");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("有发票盈亏量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdNoInvoiceLoss");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("无发票盈亏量");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public ZMCMInventorydetail() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdInventoryId - 盘点主表主键
	 * 
	 * @return the fdInventoryId
	 */
	public String getFdInventoryId() {
		return this.fdInventoryId;
	}

	/**
	 * set the fdInventoryId - 盘点主表主键
	 */
	public void setFdInventoryId(String fdInventoryId) {
		this.fdInventoryId = fdInventoryId;
	}

	/**
	 * get the fdMaterialId - 物资ID
	 * 
	 * @return the fdMaterialId
	 */
	public String getFdMaterialId() {
		return this.fdMaterialId;
	}

	/**
	 * set the fdMaterialId - 物资ID
	 */
	public void setFdMaterialId(String fdMaterialId) {
		this.fdMaterialId = fdMaterialId;
	}

	/**
	 * get the fdMaterialCode - 物资编码
	 * 
	 * @return the fdMaterialCode
	 */
	public String getFdMaterialCode() {
		return this.fdMaterialCode;
	}

	/**
	 * set the fdMaterialCode - 物资编码
	 */
	public void setFdMaterialCode(String fdMaterialCode) {
		this.fdMaterialCode = fdMaterialCode;
	}

	/**
	 * get the fdMaterialInnerCode - 物资内码
	 * 
	 * @return the fdMaterialInnerCode
	 */
	public String getFdMaterialInnerCode() {
		return this.fdMaterialInnerCode;
	}

	/**
	 * set the fdMaterialInnerCode - 物资内码
	 */
	public void setFdMaterialInnerCode(String fdMaterialInnerCode) {
		this.fdMaterialInnerCode = fdMaterialInnerCode;
	}

	/**
	 * get the fdMaterialName - 物资名称
	 * 
	 * @return the fdMaterialName
	 */
	public String getFdMaterialName() {
		return this.fdMaterialName;
	}

	/**
	 * set the fdMaterialName - 物资名称
	 */
	public void setFdMaterialName(String fdMaterialName) {
		this.fdMaterialName = fdMaterialName;
	}

	/**
	 * get the fdSpecModel - 规格型号
	 * 
	 * @return the fdSpecModel
	 */
	public String getFdSpecModel() {
		return this.fdSpecModel;
	}

	/**
	 * set the fdSpecModel - 规格型号
	 */
	public void setFdSpecModel(String fdSpecModel) {
		this.fdSpecModel = fdSpecModel;
	}

	/**
	 * get the fdNumber - 图号
	 * 
	 * @return the fdNumber
	 */
	public String getFdNumber() {
		return this.fdNumber;
	}

	/**
	 * set the fdNumber - 图号
	 */
	public void setFdNumber(String fdNumber) {
		this.fdNumber = fdNumber;
	}

	/**
	 * get the fdQuality - 材质
	 * 
	 * @return the fdQuality
	 */
	public String getFdQuality() {
		return this.fdQuality;
	}

	/**
	 * set the fdQuality - 材质
	 */
	public void setFdQuality(String fdQuality) {
		this.fdQuality = fdQuality;
	}

	/**
	 * get the fdMetric - 计量单位
	 * 
	 * @return the fdMetric
	 */
	public String getFdMetric() {
		return this.fdMetric;
	}

	/**
	 * set the fdMetric - 计量单位
	 */
	public void setFdMetric(String fdMetric) {
		this.fdMetric = fdMetric;
	}

	/**
	 * get the fdPrice - 单价
	 * 
	 * @return the fdPrice
	 */
	public Double getFdPrice() {
		return this.fdPrice;
	}

	/**
	 * set the fdPrice - 单价
	 */
	public void setFdPrice(Double fdPrice) {
		this.fdPrice = fdPrice;
	}

	/**
	 * get the fdAccountSum - 账面库存量
	 * 
	 * @return the fdAccountSum
	 */
	public Double getFdAccountSum() {
		return this.fdAccountSum;
	}

	/**
	 * set the fdAccountSum - 账面库存量
	 */
	public void setFdAccountSum(Double fdAccountSum) {
		this.fdAccountSum = fdAccountSum;
	}

	/**
	 * get the fdActualSum - 实际库存量
	 * 
	 * @return the fdActualSum
	 */
	public Double getFdActualSum() {
		return this.fdActualSum;
	}

	/**
	 * set the fdActualSum - 实际库存量
	 */
	public void setFdActualSum(Double fdActualSum) {
		this.fdActualSum = fdActualSum;
	}

	/**
	 * get the fdProfitLoss - 盈亏量
	 * 
	 * @return the fdProfitLoss
	 */
	public Double getFdProfitLoss() {
		return this.fdProfitLoss;
	}

	/**
	 * set the fdProfitLoss - 盈亏量
	 */
	public void setFdProfitLoss(Double fdProfitLoss) {
		this.fdProfitLoss = fdProfitLoss;
	}

	/**
	 * get the fdReason - 盈亏原因
	 * 
	 * @return the fdReason
	 */
	public String getFdReason() {
		return this.fdReason;
	}

	/**
	 * set the fdReason - 盈亏原因
	 */
	public void setFdReason(String fdReason) {
		this.fdReason = fdReason;
	}

	/**
	 * get the fdImportNum - 入库数量
	 * 
	 * @return the fdImportNum
	 */
	public Double getFdImportNum() {
		return this.fdImportNum;
	}

	/**
	 * set the fdImportNum - 入库数量
	 */
	public void setFdImportNum(Double fdImportNum) {
		this.fdImportNum = fdImportNum;
	}
	
	/**
	 * get the fdExportNum - 出库数量
	 * 
	 * @return the fdExportNum
	 */
	public Double getFdExportNum() {
		return this.fdExportNum;
	}

	/**
	 * set the fdExportNum - 出库数量
	 */
	public void setFdExportNum(Double fdExportNum) {
		this.fdExportNum = fdExportNum;
	}
	
	/**
	 * get the fdAccountMoney - 账面库存金额
	 * 
	 * @return the fdAccountMoney
	 */
	public Double getFdAccountMoney() {
		return this.fdAccountMoney;
	}

	/**
	 * set the fdAccountMoney - 账面库存金额
	 */
	public void setFdAccountMoney(Double fdAccountMoney) {
		this.fdAccountMoney = fdAccountMoney;
	}
	
	/**
	 * get the fdActualMoney - 实际库存金额
	 * 
	 * @return the fdActualMoney
	 */
	public Double getFdActualMoney() {
		return this.fdActualMoney;
	}

	/**
	 * set the fdActualMoney - 实际库存金额
	 */
	public void setFdActualMoney(Double fdActualMoney) {
		this.fdActualMoney = fdActualMoney;
	}
	
	/**
	 * get the fdHasInvoiceNum - 有发票库存量
	 * 
	 * @return the fdHasInvoiceNum
	 */
	public Double getFdHasInvoiceNum() {
		return this.fdHasInvoiceNum;
	}

	/**
	 * set the fdHasInvoiceNum - 有发票库存量
	 */
	public void setFdHasInvoiceNum(Double fdHasInvoiceNum) {
		this.fdHasInvoiceNum = fdHasInvoiceNum;
	}
	
	/**
	 * get the fdNoInvoiceNum - 无发票库存量
	 * 
	 * @return the fdNoInvoiceNum
	 */
	public Double getFdNoInvoiceNum() {
		return this.fdNoInvoiceNum;
	}
	
	/**
	 * set the fdNoInvoiceNum - 无发票库存量
	 */
	public void setFdNoInvoiceNum(Double fdNoInvoiceNum) {
		this.fdNoInvoiceNum = fdNoInvoiceNum;
	}
	
	/**
	 * get the fdHasInvoiceLoss - 有发票盈亏
	 * 
	 * @return the fdHasInvoiceLoss
	 */
	public Double getFdHasInvoiceLoss() {
		return this.fdHasInvoiceLoss;
	}

	/**
	 * set the fdHasInvoiceLoss - 有发票盈亏
	 */
	public void setFdHasInvoiceLoss(Double fdHasInvoiceLoss) {
		this.fdHasInvoiceLoss = fdHasInvoiceLoss;
	}
	
	/**
	 * get the fdNoInvoiceLoss - 无发票盈亏
	 * 
	 * @return the fdNoInvoiceLoss
	 */
	public Double getFdNoInvoiceLoss() {
		return this.fdNoInvoiceLoss;
	}
	
	/**
	 * set the fdNoInvoiceLoss - 无发票盈亏
	 */
	public void setFdNoInvoiceLoss(Double fdNoInvoiceLoss) {
		this.fdNoInvoiceLoss = fdNoInvoiceLoss;
	}
	
	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdInventoryId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdInventoryId")), fdInventoryId));
		setFdMaterialId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialId")), fdMaterialId));
		setFdMaterialCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialCode")), fdMaterialCode));
		setFdMaterialInnerCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialInnerCode")), fdMaterialInnerCode));
		setFdMaterialName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMaterialName")), fdMaterialName));
		setFdSpecModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSpecModel")), fdSpecModel));
		setFdNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNumber")), fdNumber));
		setFdQuality(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdQuality")), fdQuality));
		setFdMetric(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMetric")), fdMetric));
		setFdPrice(NumberUtils.toDouble(StringUtils.toString(map.get("fdPrice")), fdPrice));
		setFdAccountSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdAccountSum")), fdAccountSum));
		setFdActualSum(NumberUtils.toDouble(StringUtils.toString(map.get("fdActualSum")), fdActualSum));
		setFdProfitLoss(NumberUtils.toDouble(StringUtils.toString(map.get("fdProfitLoss")), fdProfitLoss));
		setFdReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdReason")), fdReason));
		setFdImportNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdImportNum")), fdImportNum));
		setFdExportNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdExportNum")), fdExportNum));
		setFdAccountMoney(NumberUtils.toDouble(StringUtils.toString(map.get("fdAccountMoney")), fdAccountMoney));
		setFdActualMoney(NumberUtils.toDouble(StringUtils.toString(map.get("fdActualMoney")), fdActualMoney));
		setFdHasInvoiceNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdHasInvoiceNum")), fdHasInvoiceNum));
		setFdNoInvoiceNum(NumberUtils.toDouble(StringUtils.toString(map.get("fdNoInvoiceNum")), fdNoInvoiceNum));
		setFdHasInvoiceLoss(NumberUtils.toDouble(StringUtils.toString(map.get("fdHasInvoiceLoss")), fdHasInvoiceLoss));
		setFdNoInvoiceLoss(NumberUtils.toDouble(StringUtils.toString(map.get("fdNoInvoiceLoss")), fdNoInvoiceLoss));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdInventoryId", StringUtils.toString(fdInventoryId, eiMetadata.getMeta("fdInventoryId")));
		map.put("fdMaterialId", StringUtils.toString(fdMaterialId, eiMetadata.getMeta("fdMaterialId")));
		map.put("fdMaterialCode", StringUtils.toString(fdMaterialCode, eiMetadata.getMeta("fdMaterialCode")));
		map.put("fdMaterialInnerCode", StringUtils.toString(fdMaterialInnerCode, eiMetadata.getMeta("fdMaterialInnerCode")));
		map.put("fdMaterialName", StringUtils.toString(fdMaterialName, eiMetadata.getMeta("fdMaterialName")));
		map.put("fdSpecModel", StringUtils.toString(fdSpecModel, eiMetadata.getMeta("fdSpecModel")));
		map.put("fdNumber", StringUtils.toString(fdNumber, eiMetadata.getMeta("fdNumber")));
		map.put("fdQuality", StringUtils.toString(fdQuality, eiMetadata.getMeta("fdQuality")));
		map.put("fdMetric", StringUtils.toString(fdMetric, eiMetadata.getMeta("fdMetric")));
		map.put("fdPrice", StringUtils.toString(fdPrice, eiMetadata.getMeta("fdPrice")));
		map.put("fdAccountSum", StringUtils.toString(fdAccountSum, eiMetadata.getMeta("fdAccountSum")));
		map.put("fdActualSum", StringUtils.toString(fdActualSum, eiMetadata.getMeta("fdActualSum")));
		map.put("fdProfitLoss", StringUtils.toString(fdProfitLoss, eiMetadata.getMeta("fdProfitLoss")));
		map.put("fdReason", StringUtils.toString(fdReason, eiMetadata.getMeta("fdReason")));
		map.put("fdImportNum", StringUtils.toString(fdImportNum, eiMetadata.getMeta("fdImportNum")));
		map.put("fdExportNum", StringUtils.toString(fdExportNum, eiMetadata.getMeta("fdExportNum")));
		map.put("fdAccountMoney", StringUtils.toString(fdAccountMoney, eiMetadata.getMeta("fdAccountMoney")));
		map.put("fdActualMoney", StringUtils.toString(fdActualMoney, eiMetadata.getMeta("fdActualMoney")));
		map.put("fdHasInvoiceNum", StringUtils.toString(fdHasInvoiceNum, eiMetadata.getMeta("fdHasInvoiceNum")));
		map.put("fdNoInvoiceNum", StringUtils.toString(fdNoInvoiceNum, eiMetadata.getMeta("fdNoInvoiceNum")));
		map.put("fdHasInvoiceLoss", StringUtils.toString(fdHasInvoiceLoss, eiMetadata.getMeta("fdHasInvoiceLoss")));
		map.put("fdNoInvoiceLoss", StringUtils.toString(fdNoInvoiceLoss, eiMetadata.getMeta("fdNoInvoiceLoss")));

		return map;

	}
}